package ru.incoremedia.gwttest.application.client.service;

import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.user.client.Cookies;
import com.google.gwt.user.client.Window;


public class LocaleService {

    private static final LocaleService instance = new LocaleService();

    public static LocaleService getInstance() {
        return instance;
    }

    public void setLocale(final String localeName) {
        Cookies.setCookie("locale", localeName, DateTimeFormat.getFormat("dd MM yyyy").parse("21 12 2012"));
        Window.Location.reload();
    }
}
